<%@ include file="/common/taglibs.jsp"%>
<title><fmt:message key="orderShipPrintList.heading" /></title>
<META name="decorator" content="printable"/>
<%
	java.util.Date now = new java.util.Date();
	request.setAttribute("now", now);
%>
<c:forEach var="orderShipment" items="${orderShipmentList}" varStatus="listStatus">
	<div class="bill_list clearfix">
		<div class="top_head clearfix">
			<div class="logo_r">
				&nbsp;
			</div>
			<div class="txt">
				<fmt:message key="orderShip.name" />
			</div>
		</div>
		<div class="content_bill clearfix">
			<div class="title clearfix">
				<h2>
					<fmt:message key="orderShipment.documentNo" />
					：${orderShipment.documentNo}
				</h2>
				<span> <fmt:message key="orderShipPrintList.print.date" /> ：
					<common:datetimeFormat date="${now}" /> </span>
			</div>
			<%---------------------------------购买的商品 -------------------------%>
			<%@include file="include/orderShipPrintList4Product.jspf" %>
			<br/>
			<%---------------------------------购买的礼券 -------------------------%>
			<%@include file="include/orderShipPrintList4Gc.jspf" %>

			<%---------------------------------兑换的礼品 -------------------------%>
			<%@include file="include/orderShipPrintList4Gift.jspf" %>
			
			<div class="total_money clearfix">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td style="vertical-align: top; width: 50%">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<th width="130px;">
										<fmt:message key="salesOrder.orderNo" />
										:
									</th>
									<td>
										${orderShipment.salesOrder.orderNo}
									</td>
								</tr>
								<tr>
									<th><fmt:message key="orderShipment.deliveryTypeDesc" />:</th>
									<td>${orderShipment.deliveryTypeDesc}</td>
								</tr>
								<c:choose>
									<c:when test="${!orderShipment.isVirtual}">
										<tr>
											<th><fmt:message key="orderShipment.shippingAddress4Ship" />:</th>
											<td>${orderShipment.shippingAddress.regionFullName}<br/>${orderShipment.shippingAddress.address1}</td>
										</tr>
										<tr>
											<th><fmt:message key="salesOrder.shipPanel.firstname" />:</th>
											<td>${orderShipment.shippingAddress.firstname}</td>
										</tr>
										<tr>
											<th><fmt:message key="orderAddress.email" />:</th>
											<td>${orderShipment.shippingAddress.email}</td>
										</tr>
										<tr>
											<th><fmt:message key="orderAddress.phoneNumber" />:</th>
											<td>${orderShipment.shippingAddress.phoneNumber}</td>
										</tr>
										<tr>
											<th><fmt:message key="orderAddress.postalcode" />:</th>
											<td>${orderShipment.shippingAddress.postalcode}</td>
										</tr>
										<tr>
											<th>
												<fmt:message key="salesOrder.deliveryTime"/>:
											</th>
											<td>
												${orderShipment.deliveryTime}
											</td>
										</tr>
										<tr>
											<th>
												<fmt:message key="salesOrder.needConfrimB4Delivery"/>:
											</th>
											<td>
												<fmt:message key="salesOrder.needConfrimB4Delivery.${orderShipment.needConfrimB4Delivery}"/>
											</td>
										</tr>
									</c:when>
									<c:otherwise>
										<tr>
											<th><fmt:message key="salesOrder.shipPanel.firstname" />:</th>
											<td>${orderShipment.shippingAddress.firstname}</td>
										</tr>
										<tr>
											<th><fmt:message key="orderAddress.email" />:</th>
											<td>${orderShipment.shippingAddress.email}</td>
										</tr>
									</c:otherwise>
								</c:choose>	
							</table>
						</td>
						<td style="vertical-align: top; width: 50%">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<c:if test="${!orderShipment.isVirtual}">
									<tr>
										<th width="120px;"><fmt:message key="orderShipment.shippingCost"/>:</th>
										<td><common:currencyFormat value="${orderShipment.shippingCost}"/></td>
									</tr>
									<tr>
										<th><fmt:message key="orderShipment.wrapId"/>:</th> 
										<td>
											<c:choose>
												<c:when test="${not empty orderShipment.wrapId}">
													<fmt:message key="orderShipment.wrapId.yes"/>
												</c:when>
												<c:otherwise>
													<fmt:message key="orderShipment.wrapId.no"/>
												</c:otherwise>
											</c:choose>
										</td>
									</tr>
									<c:if test="${not empty orderShipment.wrapName}">
										<tr>
											<th><fmt:message key="orderShipment.wrapName"/>:</th>
											<td>${orderShipment.wrapName}</td>
										</tr>
									</c:if>
									<c:if test="${not empty orderShipment.wrapNote}">
										<tr>
											<th><fmt:message key="orderShipment.wrapNote"/>:</th>
											<td>${orderShipment.wrapNote}</td>
										</tr>
									</c:if>
									<c:if test="${not empty orderShipment.wrapCost}">
										<tr>
											<th><fmt:message key="orderShipment.wrapCost"/>:</th>
											<td><common:currencyFormat value="${orderShipment.wrapCost}"/></td>
										</tr>
									</c:if>
								</c:if>
								<tr>
									<th><fmt:message key="orderShipment.createTime"/>:</th>
									<td><fmt:formatDate value="${orderShipment.createTime}" pattern="yyyy-MM-dd HH:mm" />&nbsp;</td>
								</tr>
								<tr>
									<th><fmt:message key="orderShipment.memo" />:</th>
									<td>${orderShipment.memo}</td>
								</tr>
								<tr>
									<th>
									</th>
									<td>
										&nbsp;
									</td>
								</tr>
							</table>
						</td>
				</table>
			</div>
			<div class="total_money clearfix">
		        <table width="100%" cellspacing="0" cellpadding="0" border="0">
					<tr>
						<th width="700px;" align="right">
							<fmt:message key="orderPrint.sign" />
							:
						</th>
						<td>
							______________________
						</td>
					</tr>	
				</table>
	        </div>
		</div>
	</div>
	<c:if test="${ fn:length(orderShipmentList) !=  (listStatus.index+1) }" >
		<div class="pageBreak"></div>
		<hr/>
	</c:if>
</c:forEach>
